﻿//-----------------------------------------------------------------------
// <copyright company="www.3WayWebdesign.de">
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// </copyright>
//
// <author>Michael Morbach</author>
// <email>Michael@3waywebdesign.de</email>
// <web>http://www.3waywebdesign.de</web>
//-----------------------------------------------------------------------


namespace Tww.IBAN.IBANUtilities.Converter
{
    #region Imports

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
using Tww.IBAN.IBANUtilities.Model;
    using Tww.IBAN.IBANUtilities.Parser;


    #endregion

    public interface IIBANConverter
    {
        #region Public Properties

        #endregion

        #region Public Methods

        /// <summary>
        /// Parses a string a builds a new IBANModel
        /// </summary>
        /// <param name="ibanParser">A Parser that reads the inputstring</param>
        /// <param name="ibanAsString">The Inputstring that represents the IBAN</param>
        /// <returns>New IBANModel</returns>
        IBANModel ConvertToIBANModel( IIBANParser ibanParser, string ibanAsString );

        /// <summary>
        /// Parses a string a builds a new IBANModel
        /// </summary>
        /// <param name="ibanAsString">The Inputstring that represents the IBAN</param>
        /// <returns>New IBANModel</returns>
        IBANModel ConvertToIBANModel( string ibanAsString );

        /// <summary>
        /// Gets the IBAN as a trimmed string like it is used in electronic form
        /// </summary>
        /// <param name="iban">IBAN Object to convert</param>
        /// <returns>IBAN as string ( e.g. -> DE21200500000123456000 )</returns>
        string ConvertToElectronicIBAN( IBANModel iban );

        /// <summary>
        /// Gets the IBAN as a four block string like it is used in paper form
        /// </summary>
        /// <param name="iban">IBAN Object to convert</param>
        /// <returns>IBAN as string ( e.g. -> IBAN DE21 2005 0000 0123 4560 00 )</returns>
        string ConvertToFourBlockIBAN( IBANModel iban );

        /// <summary>
        /// Gets the Checksum of this IBAN Object
        /// </summary>
        /// <param name="iban">IBAN Object to check</param>
        /// <returns>Checksum</returns>
        int CalculateChecksum( string iban );

        #endregion

        #region Events

        #endregion
    }
}
